SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[accident_casualty](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ACCIDENT_ID] [int] NOT NULL,
	[NAME] [varchar](20) NOT NULL,
	[GENDER] [tinyint] NULL,
	[AGE] [tinyint] NULL,
	[WORK_AGE] [tinyint] NULL,
	[WORK_TYPE] [varchar](50) NULL,
	[CASUALTY_DETAIL] [varchar](500) NOT NULL,
	[SERIOUS_LEVEL] [varchar](500) NULL,
 CONSTRAINT [PK_accident_casulty] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[accident_checkform1](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[REASON] [varchar](5000) NULL,
	[DUTY] [varchar](5000) NULL,
	[TEAM] [varchar](500) NULL,
	[MORAL] [varchar](500) NULL,
	[INTROSPECTION] [varchar](2000) NULL,
	[REVIEW_DETAIL] [varchar](5000) NULL,
	[REVIEW_TEAM] [varchar](500) NULL,
	[REVIEW_TIME] [datetime] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_accident_checkform1] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[accident_checkform2](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[REASON] [varchar](5000) NULL,
	[DUTY] [varchar](5000) NULL,
	[TEAM] [varchar](500) NULL,
	[MORAL] [varchar](500) NULL,
	[INTROSPECTION] [varchar](2000) NULL,
	[REVIEW_DETAIL] [varchar](5000) NULL,
	[REVIEW_TEAM] [varchar](500) NULL,
	[REVIEW_TIME] [datetime] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_accident_checkform2] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[accident_checkform3](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[REASON] [varchar](5000) NULL,
	[DUTY] [varchar](5000) NULL,
	[TEAM] [varchar](500) NULL,
	[MORAL] [varchar](500) NULL,
	[INTROSPECTION] [varchar](2000) NULL,
	[REVIEW_DETAIL] [varchar](5000) NULL,
	[REVIEW_TEAM] [varchar](500) NULL,
	[REVIEW_TIME] [datetime] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_accident_checkform3] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[accident_infosheet](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[ACCIDENT_NAME] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[HANDLE] [varchar](2000) NOT NULL,
	[REASON] [varchar](2000) NOT NULL,
	[MORAL] [varchar](2000) NULL,
	[CASUALTY] [varchar](500) NULL,
	[SERIOUS_INJURY_COUNT] [int] NULL,
	[DEATH_COUNT] [int] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_accident_infosheet] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[accident_quickreport](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[HANDLE] [varchar](2000) NULL,
	[REASON] [varchar](2000) NULL,
	[MORAL] [varchar](2000) NULL,
	[CASUALTY] [varchar](500) NULL,
	[SERIOUS_INJURY_COUNT] [int] NULL,
	[DEATH_COUNT] [int] NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
 CONSTRAINT [PK_accident_quickreport] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[accident_registerform](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[ACCIDENT_NAME] [varchar](200) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[HANDLE] [varchar](2000) NOT NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_accident_registerform] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[accident_report](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[REASON] [varchar](5000) NULL,
	[DUTY] [varchar](5000) NULL,
	[TEAM] [varchar](500) NULL,
	[MORAL] [varchar](500) NULL,
	[INTROSPECTION] [varchar](2000) NULL,
	[REVIEW_DETAIL] [varchar](5000) NULL,
	[REVIEW_TEAM] [varchar](500) NULL,
	[REVIEW_TIME] [datetime] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_accident_report] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_accident_checkform1](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[REASON] [varchar](5000) NULL,
	[DUTY] [varchar](5000) NULL,
	[TEAM] [varchar](500) NULL,
	[MORAL] [varchar](500) NULL,
	[INTROSPECTION] [varchar](2000) NULL,
	[REVIEW_DETAIL] [varchar](5000) NULL,
	[REVIEW_TEAM] [varchar](500) NULL,
	[REVIEW_TIME] [datetime] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_deleted_accident_checkform1] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_accident_checkform2](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[REASON] [varchar](5000) NULL,
	[DUTY] [varchar](5000) NULL,
	[TEAM] [varchar](500) NULL,
	[MORAL] [varchar](500) NULL,
	[INTROSPECTION] [varchar](2000) NULL,
	[REVIEW_DETAIL] [varchar](5000) NULL,
	[REVIEW_TEAM] [varchar](500) NULL,
	[REVIEW_TIME] [datetime] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_deleted_accident_checkform2] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_accident_checkform3](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[REASON] [varchar](5000) NULL,
	[DUTY] [varchar](5000) NULL,
	[TEAM] [varchar](500) NULL,
	[MORAL] [varchar](500) NULL,
	[INTROSPECTION] [varchar](2000) NULL,
	[REVIEW_DETAIL] [varchar](5000) NULL,
	[REVIEW_TEAM] [varchar](500) NULL,
	[REVIEW_TIME] [datetime] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_deleted_accident_checkform3] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_accident_infosheet](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[ACCIDENT_NAME] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[HANDLE] [varchar](2000) NOT NULL,
	[REASON] [varchar](2000) NOT NULL,
	[MORAL] [varchar](2000) NULL,
	[CASUALTY] [varchar](500) NULL,
	[SERIOUS_INJURY_COUNT] [int] NULL,
	[DEATH_COUNT] [int] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_deleted_accident_infosheet] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_accident_quickreport](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[HANDLE] [varchar](2000) NULL,
	[REASON] [varchar](2000) NULL,
	[MORAL] [varchar](2000) NULL,
	[CASUALTY] [varchar](500) NULL,
	[SERIOUS_INJURY_COUNT] [int] NULL,
	[DEATH_COUNT] [int] NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
 CONSTRAINT [PK_deleted_accident_quickreport] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_accident_registerform](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[ACCIDENT_NAME] [varchar](200) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[HANDLE] [varchar](2000) NOT NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_deleted_accident_registerform] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_accident_casualty](
	[ID] [int] NOT NULL,
	[ACCIDENT_ID] [int] NOT NULL,
	[NAME] [varchar](20) NOT NULL,
	[GENDER] [tinyint] NULL,
	[AGE] [tinyint] NULL,
	[WORK_AGE] [tinyint] NULL,
	[WORK_TYPE] [varchar](50) NULL,
	[CASUALTY_DETAIL] [varchar](500) NOT NULL,
	[SERIOUS_LEVEL] [varchar](500) NULL,
 CONSTRAINT [PK_deleted_accident_casulty] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[deleted_accident_report](
	[ID] [int] NOT NULL,
	[ACCIDENT_TYPE_ID] [int] NOT NULL,
	[ACCIDENT_TIME] [datetime] NOT NULL,
	[ACCIDENT_STATUS] [tinyint] NOT NULL,
	[CASUALTY] [varchar](500) NULL,
	[LOSS] [varchar](500) NULL,
	[OVERVIEW] [varchar](2000) NULL,
	[REASON] [varchar](5000) NULL,
	[DUTY] [varchar](5000) NULL,
	[TEAM] [varchar](500) NULL,
	[MORAL] [varchar](500) NULL,
	[INTROSPECTION] [varchar](2000) NULL,
	[REVIEW_DETAIL] [varchar](5000) NULL,
	[REVIEW_TEAM] [varchar](500) NULL,
	[REVIEW_TIME] [datetime] NULL,
	[ACCIDENT_WRITE_TIME] [datetime] NOT NULL,
	[ACCIDENT_WRITE_USER_ID] [int] NOT NULL,
 CONSTRAINT [PK_deleted_accident_report] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

alter table accident_quickreport add ACCIDENT_NAME varchar(200) null
go
alter table deleted_accident_quickreport add ACCIDENT_NAME varchar(200) null
go
alter table accident_report add ACCIDENT_NAME varchar(200) null
go
alter table deleted_accident_report add ACCIDENT_NAME varchar(200) null
go
alter table accident_checkform1 add ACCIDENT_NAME varchar(200) null
go
alter table deleted_accident_checkform1 add ACCIDENT_NAME varchar(200) null
go
alter table accident_checkform2 add ACCIDENT_NAME varchar(200) null
go
alter table deleted_accident_checkform2 add ACCIDENT_NAME varchar(200) null
go
alter table accident_checkform3 add ACCIDENT_NAME varchar(200) null
go
alter table deleted_accident_checkform3 add ACCIDENT_NAME varchar(200) null
go

alter table accident_registerform add [FACADE_ID] [int] NULL
go
alter table deleted_accident_registerform add [FACADE_ID] [int] NULL
go
alter table accident_infosheet add [FACADE_ID] [int] NULL
go
alter table deleted_accident_infosheet add [FACADE_ID] [int] NULL
go
alter table accident_quickreport add [FACADE_ID] [int] NULL
go
alter table deleted_accident_quickreport add [FACADE_ID] [int] NULL
go
alter table accident_report add [FACADE_ID] [int] NULL
go
alter table deleted_accident_report add [FACADE_ID] [int] NULL
go
alter table accident_checkform1 add [FACADE_ID] [int] NULL
go
alter table deleted_accident_checkform1 add [FACADE_ID] [int] NULL
go
alter table accident_checkform2 add [FACADE_ID] [int] NULL
go
alter table deleted_accident_checkform2 add [FACADE_ID] [int] NULL
go
alter table accident_checkform3 add [FACADE_ID] [int] NULL
go
alter table deleted_accident_checkform3 add [FACADE_ID] [int] NULL
go
  
--事故情况登记表
--作业部阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 9, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 6, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 8, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 5, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 4, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 3, 2, 1)
go
--处室阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 12, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 13, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(5, 14, 2, 1)
go

--事故流转
--作业部上报
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 9, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 6, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 8, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 5, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 4, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 3, 3, 1)
go
--处室上报
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 12, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 13, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 14, 3, 1)
go
--作业部退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 9, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 6, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 8, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 5, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 4, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 3, 4, 1)
go
--处室退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 12, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 13, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 14, 4, 1)
go
--作业部确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 9, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 6, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 8, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 5, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 4, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 3, 1, 0)
go
--处室确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 12, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 13, 1, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(6, 14, 1, 1)
go
